package main

import "fmt"

/**
  闭包坑
 */
func main() {
	s := []string{"a","v","d"}

	for _,v := range s{
		//go func() {
		//	fmt.Println(v)       //都是d，解决方式：采用参数传递
		//}()

		go func(v string) {
			fmt.Println(v)
		}(v)
	}

	select {

	}
}
